<!DOCTYPE html>
<html>

<head>
  <title>购物车</title>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" href="./static/index/css/public.css">
  <link rel="stylesheet" type="text/css" href="./static/index/css/reclassify.css">
  <link rel="stylesheet" type="text/css" href="./static/index/css/cart.css">
  <link rel="stylesheet" type="text/css" href="./static/index/css/common.css" />
  <link rel="stylesheet" type="text/css" href="./static/index/css/search.css" />
  <link rel="stylesheet" type="text/css" href="./static/index/css/index.css" />
  <link rel="stylesheet" type="text/css" href="./static/index/css/font.css" />
</head>
<style>
  .dis {
    display: none;
  }
</style>

<body style="background: #FFF;">

  <!-- <jsp:include page="header.jsp" /> -->
  <div id="searchss">
    <div class="search">
      <div class="logo">
        <a href="index"><img src="./static/index/img/backimg.png" /></a>
      </div>
      <div class="sear_input">
        <input type="text" id="goodsname" name="name" value="">
        <button class="btnser"><i class="iconfont icon-icon--"></i></button>
      </div>
      <div class="sera_cart">
        <a href="javascript:void(0)">
          <p onclick="myCart()"><i class="iconfont btnser icon-gouwuche5"></i>我的购物车</p>
        </a>
        <span class="cartnum"></span>
      </div>

      <div class="sear_fir">


        <div class="sinup sinup1">
          <a onclick="loginin()" href="javascript:void(0)">登录</a>
          <a>/</a>
          <a onclick="res()" href="javascript:void(0)">注册</a>
        </div>



        <div class="sinup">
          <a target="_blank" href="../admin/login.html">后台管理</a>
        </div>



        <div class="sigin">
          <span class="wel" id="wel"></span>
        </div>
        <div class="my">
          <a>个人中心</a>
          <i class="iconfont icon-zheng-triangle1"></i>
          <ul class="uls">
            <li onclick="myorder()"><a href="javascript:void(0)">我的订单</a></li>
            <li onclick="address()"><a href="javascript:void(0)">收货地址</a></li>
            <li onclick="pwd()"><a href="javascript:void(0)">修改密码</a></li>
            <li onclick="logout()"><a href="javascript:void(0)">退出</a></li>
          </ul>
        </div>

      </div>


    </div>
  </div>

  <!--导航nav-->
  <div id="navall">
    <div id="nav">
      <!--产品分类-->
      <div class="proclass">
        <p>产品分类</p>

        <div class="prolist" style="display:none;">

          <!--类目  -->

          <!-- <div class="list">
            <dl>
                <a href="type?id=${type.id}">
                  <dt>${type.name}</dt>
                </a>
              </dl>
          </div> -->
        </div>
      </div>

      <!--导航-->
      <ul id="inav">
        <li class=""><a href="./index.html">商城首页</a></li>
        <li onclick="selectAll(1)"><a href="javascript:void(0)">今日推荐</a></li>
        <li onclick="selectAll(2)"><a href="javascript:void(0);">热销排行</a></li>
        <li onclick="selectAll(3)"><a href="javascript:void(0);">新品上市</a></li>
      </ul>

    </div>
  </div>
  <div id="main" class="main">

    <!-- 购物车列表 -->
    <div id="myCart">
      <div class="cart-tit">
        <ul>
          <li class="li2">商品封面</li>
          <li class="li3">商品信息</li>
          <li class="li4">规格</li>
          <li class="li5">单价(元)</li>
          <li class="li6">数量</li>
          <li class="li7">小计(元)</li>
          <li class="li8">操作</li>
        </ul>
      </div>


      <div class="cart-list">

        <div class="cart-cont">
          <ul class="ul1">
            <li class="li2">
              <a href="detail?id=${cart.good.id}">
                <img src="${cart.good.cover}">
              </a>
            </li>
            <li class="li3">
              <p class="goods-name">${cart.good.name}</p>
              <p class="goods-des">${cart.good.intro}</p>
            </li>
            <li class="li4">
              <p><span>${cart.good.spec}</span><br></p>
            </li>
            <li class="li5">￥<span class="price">${cart.good.price}</span></li>
            <li class="li6">
              <c:if test="${cart.amount== 1}">
                <span class="cut" style="cursor: pointer" disabled="disabled">-</span>
              </c:if>
              <c:if test="${cart.amount!= 1}">
                <a href="/index/updateCartsAmount?type=reduce&id=${cart.id}">
                  <span class="cut" style="cursor: pointer" onclick="cartLess(this,${cart.good.id})">-</span>
                </a>
              </c:if>
              <input type="text" class="sum" value="${cart.amount}" readonly="readonly">
              <a href="/index/updateCartsAmount?type=add&id=${cart.id}">
                <span class="add" style="cursor: pointer" onclick="cartAdd(this,${cart.good.id})">+</span>
              </a>


            </li>
            <li class="li7">￥<span class="subtotal">${cart.total}</span></li>
            <li class="li8">
              <i style="cursor: pointer" class="iconfont icon-shanchu" onclick="cartDelete(this,${cart.id})"></i>
            </li>
          </ul>
        </div>
      </div>

      <div class="cart-foot">
        <div class="foot-right">
          <div class="mdd">
            <p class="one">
              <span>订单总额 ：<span class="price">￥<span class="m-price">${cartTotal}</span></span></span>
            </p>
          </div>
          <a href="orderSave">
            <a href="./pay.html"><span class="js" style="background: rgb(255, 113, 43);">去结算</span></a>
          </a>
        </div>
      </div>
    </div>

    <!-- 购物车空 -->
    <div id="cartnull" style="display:block;">
      <div class="null-left">
        <img src="./static/index/img/cart.png">
      </div>
      <div class="null-right">
        <span>购物车还是空的呢！快去选购心仪的商品吧~~</span>
        <a href="./index.html">
          <p>去逛逛~</p>
        </a>
      </div>
    </div>

  </div>

  <iframe src="./footer.html" width="100%" height="100%" frameborder="0" collapsing="yes" scrolling="no"></iframe>

</body>
<script src="./static/index/js/jquery.min.js" type="text/javascript"></script>
<script src="../js/jquery-3.1.1.min.js"></script>
<script src="./static/index/layer/layer.js" type="text/javascript"></script>
<!-- <script src="./js/goods.js"></script> -->
<script src="../js/header.js"></script>
<script src="./js/cart.js"></script>
<script type="text/javascript">

</script>

</html>